<template>
  <div id="app">
    <BackgroundBody></BackgroundBody>
    <div class="container">
      <router-view/>
      <!-- <PlayerBar></PlayerBar> -->
    </div>
  </div>
</template>

<script>
import BackgroundBody from "./components/BackgroundBody";

// import Music from '@/components/Music';

export default {
  created() {
    this.updateViewSize();
    window.onresize = this.updateViewSize;
    this.bg_w = this.$store.getters.bgImgSize[0];
    this.bg_h = this.$store.getters.bgImgSize[1];
  },
  data() {
    return {
      bg_w: "",
      bg_h: ""
    };
  },
  methods: {
    updateViewSize() {
      let bw = window.document.documentElement.clientWidth;
      console.log(bw);
      let bh = window.document.documentElement.clientHeight;
      console.log(bh);
      this.$store.commit("updateStateViewData", [bw, bh, bw/bh])
    }
  },
  components: {
    BackgroundBody
  }
};
</script>

<style lang="scss">
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  position: absolute;
  width: 100%;
  min-height: 100%;
  background-color: rgba($color: #000000, $alpha: 0.8);
}

#app::after {
  content: "";
  background-color: #fff;
  width: 100px;
  height: 100px;
}
</style>
